<!--
 * @Description: 伪元素选择器
 * @Author: rendc
 * @Date: 2021-08-06 14:21:36
 * @LastEditors: rendc
 * @LastEditTime: 2021-08-06 15:38:04
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>伪元素选择器</title>
  <style>
    h2::before {
      content: "***";
      color: tomato;
    }

    h2::after {
      content: "***";
      color: tomato;
    }

    /* p::first-letter {
      font-size: 20px;
      color: tomato;
    } */

    p::first-line {
      font-size: 20px;
      color: tomato;
    }

    p::selection {
      color: white;
      background-color: tomato;
    }
  </style>
</head>

<body>
  <div class="app">
    <h2>标题一</h2>
    <h2>标题二</h2>
    <h2>标题三</h2>
    <p>
      我们的祖国是花园。
      <br>
      我们的祖国是花园。
    </p>
    <div>123</div>
    <p>123-p1</p>
  </div>

</body>

</html>